from flask import Flask, request, jsonify
from simplepage import simple_page

app = Flask(__name__)

@app.errorhandler(404)
@app.errorhandler(405)
def _handle_api_error(ex):
    if request.path.startswith('/api/'):
        return jsonify(ex)
    else:
        return ex
# app.register_blueprint(simple_page)
app.register_blueprint(simple_page, url_prefix='/s')

if __name__ == "__main__":
    print(app.url_map)
    app.run()